LOCAL_PATH := $(call my-dir)

### shared library

include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
	android/com_android_inputmethod_pinyin_PinyinDecoderService.cpp \
	share/dictbuilder.cpp \
	share/dictlist.cpp \
	share/dicttrie.cpp \
	share/lpicache.cpp \
	share/matrixsearch.cpp \
	share/mystdlib.cpp \
	share/ngram.cpp \
	share/pinyinime.cpp \
	share/searchutility.cpp \
	share/spellingtable.cpp \
	share/spellingtrie.cpp \
	share/splparser.cpp \
	share/userdict.cpp \
	share/utf16char.cpp \
	share/utf16reader.cpp \
	share/sync.cpp

LOCAL_C_INCLUDES += $(JNI_H_INCLUDE)
#LOCAL_LDLIBS += -lpthread
# 传统上，pthread 是作为外部库实现的 ，必须通过提供链接器标志-lpthread进行链接。
# 安卓的仿生 C 库捆绑了自己的 pthread 实现。因此，我们在项目中不使用Android.mk文件中的-lpthread。
LOCAL_LDLIBS += -pthread -llog
LOCAL_MODULE := libjni_pinyinime
#LOCAL_SHARED_LIBRARIES := libcutils libutils # 旧库要删掉
LOCAL_MODULE_TAGS := optional

# 强制 16KB 对齐
LOCAL_LDFLAGS += -Wl,-z,max-page-size=16384

include $(BUILD_SHARED_LIBRARY)
